﻿<%@ Page language="c#"  MasterPageFile="../masterpages/umbracoPage.Master" validateRequest="false" Codebehind="editOrder.aspx.cs" AutoEventWireup="True" Inherits="Procure.Web.order.editOrder" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>

<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="server">
    <cc1:UmbracoPanel ID="UmbracoPanel2" hasMenu="true" runat="server" Text="Order Details">
        <cc1:Pane ID="Pane1" runat="server">
            <cc1:PropertyPanel ID="OrderedOnPPanel" runat="server" Text="Ordered On:">
                <asp:Label ID="OrderedOn" runat="server" />
            </cc1:PropertyPanel>
        </cc1:Pane>
        <cc1:Pane ID="Pane2" runat="server">
            <cc1:PropertyPanel ID="UsernamePPanel" runat="server" Text="Username:">
                <asp:Label ID="Username" runat="server" />
            </cc1:PropertyPanel>
        </cc1:Pane>
        <cc1:Pane ID="Pane3" runat="server">
            <cc1:PropertyPanel ID="StatusPPanel" runat="server" Text="Status:">
                <asp:DropDownList ID="OrderStatus" runat="server" DataTextField="Name" DataValueField="Id" /> 
                <asp:Label ID="NextStatus" runat="server" />
            </cc1:PropertyPanel>
        </cc1:Pane>
        <cc1:Pane ID="ProductsPane" runat="server">
            <cc1:PropertyPanel ID="ProductsPropertyPanel" runat="server" Text="Order">
                
                <asp:ListView ID="ProductsList" runat="server">
                    <LayoutTemplate>
                        <table>
                            <thead>
                                <tr>
                                    <td>Product</td>
                                    <td>Price</td>
                                    <td>Quantity</td> 
                                    <td>Total</td> 
                                </tr>
                            </thead>
                            <tbody>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
                            </tbody>
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td><%# (Container.DataItem as Procure.Data.Context.OrderProduct).Product.Name %></td>
                            <td><%# (Container.DataItem as Procure.Data.Context.OrderProduct).Price.ToString("C")%></td>
                            <td><%# (Container.DataItem as Procure.Data.Context.OrderProduct).Quantity.ToString("N0")%></td>
                            <td><%# ((Container.DataItem as Procure.Data.Context.OrderProduct).Quantity * (Container.DataItem as Procure.Data.Context.OrderProduct).Price).ToString("C")%></td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
            </cc1:PropertyPanel>
        </cc1:Pane>
    </cc1:UmbracoPanel>
</asp:Content>